import 'package:flutter/cupertino.dart';
import 'package:shared_preferences/shared_preferences.dart';

class SPHelper {
  static final SPHelper _helper = SPHelper.internal();

  SPHelper.internal();

  factory SPHelper() => _helper;

  saveUserAccount({String account}) async {
    SharedPreferences prefs = await SharedPreferences.getInstance();
    prefs.setString("useraccount", account);
  }

  Future<String> getUserAccount() async {
    SharedPreferences prefs = await SharedPreferences.getInstance();
    return prefs.getString("useraccount");
  }
}
